<?php
// +----------------------------------------------------------------------
// | QSCMS
// +----------------------------------------------------------------------
// | Copyright (c)  2025 https://www.qqss.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed QSCMS is not free software, commercial use must purchase official license from official website to avoid unnecessary legal disputes.
// +----------------------------------------------------------------------
// | Author: Contract 990504246@qq.com
// +----------------------------------------------------------------------

namespace app\adminapi\validate\user;

use app\adminapi\validate\Base;

class SignValidate extends Base
{
    protected $rule = [
        'id'      => 'require',
        'user_id' => 'require|number',
        'date'    => 'date',
    ];

    protected $message = [
        'id.require'      => 'id_required',
        'user_id.require' => 'user_id_required',
        'user_id.number'  => 'user_id_number',
        'date.date'       => 'sign_date_date',
    ];

    // 签到记录查询场景
    public function sceneList()
    {
        return $this->only(['user_id', 'date']);
    }
}